A1 = readmatrix('NiI2_24Vcool_it.csv')
A2 = readmatrix('NiI2_-24Vcool_it.csv')

x1 = A1(101:201,1)-5
y1 = A1(101:201,2)*1e12

x2 = A2(:,1)-5
y2 = A2(:,2)*1e12

for i = 1:101
    m1(i)=y1(i)-i*0.008+0.2
end

for i = 1:101
    m2(i)=y2(i)*0.8
end


hold on
xlim([50, 65])
plot(x1,m1,'Linewidth',1,'Color',[0.8 0 0])
plot(x2,m2,'Linewidth',1,'Color',[0 0 0.8])
xlabel('Temperature [K]')
ylabel('Photocurrent [pA]')
ylim([-3.6,3.6])
set(gca,'XMinorTick','on','YMinorTick','on')
set(gca,'box','on','Xcolor',[0 0 0],'Ycolor',[0 0 0])
legend('24V', '-24V')
legend boxoff
hold off

set(gcf,'Position',[0, 0, 190, 190])